# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-re-assert
_pyname=re-assert
pkgver=1.1.0
pkgrel=4
pkgdesc="Easy assertions of regexes"
url="https://github.com/asottile/re-assert"
arch="noarch"
license="MIT"
depends="python3 py3-regex"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/asottile/re-assert/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fc14267cc68a12ff7350982f0bf54c77107809c9f0379ab3aa73fa1b7cf5ccabb130fcd35ab75bdf183e69c802a041deac707e1f0bab1c3815d4146b4e320c07  re-assert-1.1.0.tar.gz
"
